import type { MaProTableColumns, MaProTableExpose } from '@mineadmin/pro-table'
import type { UseDialogExpose } from '@/hooks/useDialog.ts'

import { ElTag } from 'element-plus'
import { useMessage } from '@/hooks/useMessage.ts'
import { deleteByIds, resetPassword } from '~/base/api/user.ts'
import { ResultCode } from '@/utils/ResultCode.ts'




export  function getTableColumns2(treeDialog: UseDialogExpose): MaProTableColumns[] {
  const msg = useMessage()
  return [
    // 多选列
    { type: 'selection', showOverflowTooltip: false},
    // 索引序号列
    // { type: 'index' },
    // 普通列
    { label: 'ID', prop: 'id' },
    { label: '商品编号', prop: 'id' },
    { label: '商品名称', prop: 'id' },
    { label: '商品类型', prop: 'id' },
    { label: '销售状态', prop: 'phone' },
    { label: '购买价格', prop: 'phone' },
    { label: '商品库存', prop: 'xxx' },
    // 操作列
    {
      type: 'operation',
      label:'对接状态',
      fixed: 'right',
      width: '80px',
      operationConfigure: {
        type: 'tile',
        actions: [
          {
            name: 'product',
            text: '未对接',
            onClick: ({ row }) => {
              treeDialog.setTitle('商品对接')
              treeDialog.open({ formType: 'product', ids: [] })
            },
          },
        ],
      },
    },
  ]
}
